﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_user_ViewMessage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session[CE.Global.General.UserId] == null)
        {
            Response.Redirect("~/Admin/AdminSecureLogin.aspx");
        }
    }

    protected void ddlUserType_SelectedIndexChanged(object sender, EventArgs e)
    {
        grvMessage.DataBind();
    }

    protected void grvMessage_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (grvMessage.Rows.Count > 0)
        {
            Response.Redirect("Message.aspx?MessageId=" + grvMessage.SelectedDataKey.Value);
        }
    }

    protected void btnSearchMessage_Click(object sender, EventArgs e)
    {
        grvMessage.DataBind();
    }

    protected void btnCreatNewMessage_Click(object sender, EventArgs e)
    {
        Response.Redirect("Message.aspx");
    }

}
